<?php
include_once dirname(__FILE__).'/../utils/StringTool.class.php';
include_once dirname(__FILE__).'/../utils/ArrayTool.class.php';

class ModRewrite extends ArrayObject {
	
	function __construct(array $keys) {
		$query = StringTool::cleanRequestVar($_SERVER["REQUEST_URI"]);
		$query = preg_split("/\//",$query);
		array_shift($query);
		$GETVars = ArrayTool::array_combine_unsize($keys, $query);
		
		foreach ($GETVars as $k => $v) {
			if ($v) {
				$this[$k] = $v;
			}
		}
	}
}

?>
